/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.jfonia.notation;

import org.jfonia.connect5.basics.BasicValueNode;
import org.jfonia.connect5.basics.MutableValueNode;
import org.jfonia.model.elements.IStaffElement;
import org.jfonia.model.elements.MusicalElement;

/**
 *
 * @author Rik Bauwens
 */
public class Bar extends MusicalElement implements IStaffElement
{
        private MutableValueNode<Integer> barTypeNode;

        public Bar(int begin, int duration)
        {
                super(duration);
                setBegin(begin);
                barTypeNode = new BasicValueNode<Integer>(0);
        }
        
        public int getBarType()
        {
                return barTypeNode.getValue();
        }

        public MutableValueNode<Integer> getBarTypeNode()
        {
                return barTypeNode;
        }

        @Override
        public Bar clone()
        {
                Bar bar = new Bar(getBegin(), getDifference());
                //chord.setChord(chordNode.getValue());
                return bar;
        }
}
